// pages/myin/myin.js
import urls from '../../utils/urls.js'
import loginFn from '../../utils/login.js'
var app = getApp()
Page({

	/**
	 * 页面的初始数据
	 */
	data: {
		options: {}
	},
	myList: function(options) {
		let that = this
		let teacherschoolList = loginFn()
		let loginInfo = wx.getStorageSync('login')
		teacherschoolList.uid = loginInfo.loginUid;
		wx.request({
			url: urls.teacherschoolList,
			data: teacherschoolList,
			success: function(res) {
				console.log(res, '666666666')
				// console.log(res.data.data.list[0].schoolInfo,'66666666666')
				that.setData({
					chargeList: res.data.data.list
				})
			}
		})
	},
	edit: function() {
		wx.navigateTo({
			url: '/pages/instituadd/instituadd',

		})
	},
	goInstituFirst: function(e) {
		console.log(e)
		let id = e.currentTarget.dataset.id
		wx.navigateTo({
			url: '/pages/institufirst/index?schoolId=' + id,
		})
	},
	/**
	 * 生命周期函数--监听页面加载
	 */
	onLoad: function(options) {
		console.log('options:',options);
		this.setData({
			options: options
		});
	},

	/**
	 * 生命周期函数--监听页面初次渲染完成
	 */
	onReady: function() {
	},

	/**
	 * 生命周期函数--监听页面显示
	 */
	onShow: function() {
		this.myList(this.data.options);
	},

	/**
	 * 生命周期函数--监听页面隐藏
	 */
	onHide: function() {

	},

	/**
	 * 生命周期函数--监听页面卸载
	 */
	onUnload: function() {

	},

	/**
	 * 页面相关事件处理函数--监听用户下拉动作
	 */
	onPullDownRefresh: function() {

	},

	/**
	 * 页面上拉触底事件的处理函数
	 */
	onReachBottom: function() {

	},

	/**
	 * 用户点击右上角分享
	 */
	onShareAppMessage: function() {

	}
})
